<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  <c:choose>
	<c:when test="${user != null}">
		<c:if test="${usertype != 'Admin User'}">
			<jsp:forward page="404.jsp" />
		</c:if>
	</c:when>
	<c:otherwise>
		<jsp:forward page="login.jsp" />
	</c:otherwise>
</c:choose> 
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<h1>Review Transaction</h1>
	</div>
	<!-- end page-heading -->

	<!--  start top-search -->
	<div id="message-area">
		<span style="color: red">${error}</span>
	</div>
	
	<table id="content-table">
		<tr>
			<th rowspan="3" class="sized"><img
				src="resource/images/shared/side_shadowleft.jpg" width="20"
				height="300" alt="" /></th>
			<th class="topleft"></th>
			<td id="tbl-border-top">&nbsp;</td>
			<th class="topright"></th>
			<th rowspan="3" class="sized"><img
				src="resource/images/shared/side_shadowright.jpg" width="20"
				height="300" alt="" /></th>
		</tr>


		<tr>
			<td id="tbl-border-left"></td>
			<td>
				<!--  start content-table-inner ...................................................................... START -->
				<div id="content-table-inner">

					<!--  start table-content  -->
					<div id="table-content">

						<form id="mainform" action="">
							<table id="product-table">

								<thead>
									<tr>
										<th class="table-header-repeat line-left "><a>ID</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>Sender's<br>Account<br>Number</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>Receiver's<br>Account<br>Number</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>Amount</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>Type</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>State</a></th>
										<th class="table-header-repeat line-left minwidth-1"><a>Create Date</a></th>
										<!-- <th class="table-header-repeat line-left minwidth-1"><a>Finish
												Date</a></th> -->


										<th class="table-header-repeat line-left minwidth-1"><a>Support Name</a></th>

										<th class="table-header-options-admin line-left "><a>Options</a></th>
									</tr>
								</thead>
								<tbody>
									<c:forEach var="transaction" items="${listTransaction}">
										<c:if test="${transaction.idTransaction != null}">
											<tr>
												<td align="center">${transaction.idTransaction}</td>
												<td align="center"><a href="detailAccountNumber.html?accountNumber=${transaction.sendAccountId.accountNumber}">${transaction.sendAccountId.accountNumber}</a></td>
												<td align="center"><a href="detailAccountNumber.html?accountNumber=${transaction.receiveAccountId.accountNumber}">${transaction.receiveAccountId.accountNumber}</a></td>
												<td align="center">${transaction.changeAmount}</td>
												<td align="center">${transaction.transactionType}</td>
												<td align="center">${transaction.transactionStatus}</td>
												<td align="center">${transaction.beginTime}</td>
												<%-- <td align="center">${transaction.endTime}</td> --%>


												<td align="center">${transaction.userSupportId.userName}</td>

												<td>
												
												
												
												
													 <input
													onClick="location.href='adminApproveTransaction.html?transactionId=${transaction.idTransaction}'"
													type="button" class="btnReject" value="Approve"
													id="transfer" /><input
													onClick="location.href='adminRejectTransaction.html?transactionId=${transaction.idTransaction}'"
													type="button" class="btnReject" value="Reject"
													id="transfer" /><input
													onClick="location.href='adminViewTransaction.html?transactionId=${transaction.idTransaction}'"
													type="button" class="btnReject" value="View" id="transfer" /> 
													
													</td>
											</tr>
											
										</c:if>
									</c:forEach>
								</tbody>
							</table>
							<!--  end product-table................................... -->
						</form>
						
					</div>
					<!--  end content-table  -->



					<!--  start paging..................................................... -->

					<!--  end paging................ -->

					<div class="clear"></div>

				</div> <!--  end content-table-inner ............................................END  -->
			</td>
			<td id="tbl-border-right"></td>
		</tr>
		<tr>
			<th class="sized bottomleft"></th>
			<td id="tbl-border-bottom">&nbsp;</td>
			<th class="sized bottomright"></th>
		</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>